﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BacteriaSimulation.Simulation
{
    /// <summary>
    /// Represents the view that a bacterium has of the environment next to him
    /// </summary>
    public class View
    {
        protected List<IndexGridCell> visibleCells;

        public List<IndexGridCell> VisibleCells
        {
            get { return visibleCells ; }
        }

        public View()
        {
            this.visibleCells = new List<IndexGridCell>();
        }

        public View(List<IndexGridCell> visibleCells)
        {
            this.visibleCells = visibleCells;
        }

        public void addCell(IndexGridCell cell)
        {
            this.visibleCells.Add(cell);
        }

        public void addAllCells(List<IndexGridCell> cells)
        {
            this.visibleCells.AddRange(cells);
        }

        public List<IndexGridCell>.Enumerator GetEnumerator()
        {
            return this.visibleCells.GetEnumerator();
        }
    }
}
